package com.itheima.exception;

import com.itheima.common.result.CommonResult;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author liguoping
 */
@RestControllerAdvice
public class GobalExceptionHandler {
    @ExceptionHandler( TokenException.class)
    public CommonResult tokenHandler(){
        return CommonResult.error("token失效");
    }
}
